package br.com.stourados.perfil.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;

public class wdgtFrases extends Composite {

	private Label lblNewLabel;
	private Button btnLegal;
	private Button btnChato;
	
	public wdgtFrases() {
		
		VerticalPanel verticalPanel = new VerticalPanel();
		verticalPanel.setStyleName("borderBottom");
		initWidget(verticalPanel);
		verticalPanel.setSize("376px", "120px");
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		verticalPanel.add(horizontalPanel);
		horizontalPanel.setSize("347px", "77px");
		
		Image image = new Image("img/face.JPG");
		horizontalPanel.add(image);
		image.setSize("81px", "67px");
		
		VerticalPanel verticalPanel_1 = new VerticalPanel();
		horizontalPanel.add(verticalPanel_1);
		verticalPanel_1.setSize("262px", "66px");
		
		TextArea txtrOPorcoVai = new TextArea();
		txtrOPorcoVai.setReadOnly(true);
		txtrOPorcoVai.setText("O porco vai te pegar.");
		verticalPanel_1.add(txtrOPorcoVai);
		txtrOPorcoVai.setSize("288px", "42px");
		
		Label lblMatheus = new Label("por Matheus");
		verticalPanel_1.add(lblMatheus);
		
		HorizontalPanel horizontalPanel_3 = new HorizontalPanel();
		verticalPanel.add(horizontalPanel_3);
		horizontalPanel_3.setSize("377px", "27px");
		
		SimplePanel simplePanel = new SimplePanel();
		horizontalPanel_3.add(simplePanel);
		simplePanel.setSize("197px", "23px");
		lblNewLabel = new Label("Voc\u00EA achou legal ");
		simplePanel.setWidget(lblNewLabel);
		lblNewLabel.setStyleName("sim");
		lblNewLabel.setVisible(false);
		lblNewLabel.setSize("202px", "100%");
		
		SimplePanel simplePanel_2 = new SimplePanel();
		horizontalPanel_3.add(simplePanel_2);
		simplePanel_2.setWidth("76px");
		
		btnChato = new Button("Legal");
		btnChato.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				if(btnChato.getText().equals("Legal")){
				lblNewLabel.setText("Voc\u00EA achou legal ");
				lblNewLabel.setVisible(true);
				btnLegal.setText("Limpar");
				btnChato.setText("Colecionar");
				}else{
					btnChato.setVisible(false);
					lblNewLabel.setText("Voc\u00EA coleciona");
				}
			}
		});
		simplePanel_2.setWidget(btnChato);

		btnChato.setSize("100%", "100%");
		
		SimplePanel simplePanel_1 = new SimplePanel();
		horizontalPanel_3.add(simplePanel_1);
		simplePanel_1.setWidth("87px");
		
		btnLegal = new Button("Chato");
		btnLegal.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				if(btnLegal.getText().equals("Chato")){
				lblNewLabel.setText("Voc\u00EA achou chato ");
				lblNewLabel.setVisible(true);
				btnLegal.setText("Limpar");
				btnChato.setVisible(false);
				}else{
					lblNewLabel.setVisible(false);
					btnLegal.setText("Chato");
					btnChato.setText("Legal");
					btnLegal.setVisible(true);
					btnChato.setVisible(true);
				}
				}
		});
		simplePanel_1.setWidget(btnLegal);

		btnLegal.setSize("76px", "100%");
	}
}
